
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
#使用sns的内置tip数据集,使用print(sns,get_dataset_names())查看内置数据集的名字
# df=sns.load_dataset('tips')
# sns.set()
# sns.relplot(x='total_bill',y='tip',data=df)
# plt.show()

#-----------------------------------------------------------------------------------------------------------------------
#时间趋势的折线图
df=pd.read_csv('Kobe_stats.csv')
print(df)
data=pd.DataFrame()
data['Season']=pd.to_datetime(df['Season'])
data['PTS']=df['PTS']

sns.set()
sns.relplot(x='Season',y='PTS',data=data,kind='line')
plt.show()

